package com.zzy.mccjt.service.sys;

import com.zzy.mccjt.dao.SysUserMapper;
import com.zzy.mccjt.entity.SysUser;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: mccjt-cloud
 * @description:
 * @author: zhouyang.zheng
 * @create: 2022-08-10 17:15
 **/
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class SysUserService {

    private final SysUserMapper sysUserMapper;

    public SysUser getById (Long id) {
        return sysUserMapper.selectById(id);
    }

    public SysUser save (SysUser sysUser) {
        sysUserMapper.insert(sysUser);
        return sysUser;
    }
}
